package com.example.guiguihomemedical.mapper;

import com.example.guiguihomemedical.entity.Servicesigning;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ServicesigningMapper {
    @Delete("delete from servicesigning where idcard=#{idcard}")
    void delete(String idcard);

    @Delete("delete from servicesigning where signingid=#{signingid}")
    void deleteBySigningId(int signingid);

    @Insert("insert into servicesigning(serviceid, idcard , signingid) values(#{serviceid},#{idcard},#{signingid})")
    void insert(Servicesigning servicesigning);

    @Select("select * from servicesigning where idcard=#{idcard}")
    Servicesigning getByIdcard(String idcard);
    @Select("select * from servicesigning")
    List<Servicesigning> getAll();

    @Select("select * from servicesigning where idcard=#{idcard} and signingid=#{signingid}")
    List<Servicesigning> getByIdcardAll(String idcard , int signingid);
}
